package com.zf.easyexcel.utils;

import com.zf.easyexcel.entity.Remark;
import com.zf.easyexcel.entity.Student;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;

/**
 * 假数据
 * @author Zhou Feng
 */
public class FakeDataUtils {

    /**
     * 获取单个对象数据
     */
    public static Student getStudent() {
        Student student = new Student();
        student.setName("学生A");
        student.setAge(23);
        return student;
    }

    /**
     * 获取列表对象数据
     */
    public static List<Remark> getRemarkData() {
        ArrayList<Remark> list = new ArrayList<>();
        for (int i = 1; i <= 5; i++) {
            Remark remark = new Remark();
            remark.setSeqNo(i);
            remark.setRemark("备注" + i);
            list.add(remark);
        }
        return list;
    }

    /**
     * 获取map类型数据
     */
    public static HashMap<String, String> getMap() {
        HashMap<String, String> map = new HashMap<>();
        map.put("test", "测试map");
        return map;
    }

    /**
     * 获取字符串列表
     */
    public static List<String> getStrList() {
        ArrayList<String> list = new ArrayList<>();
        for (int i = 1; i <= 5; i++) {
            list.add("字符串"+i);
        }
        return list;
    }


}
